package com.demo.service;

import org.opensearch.client.opensearch.OpenSearchClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.IOException;

@Service
public class SearchService {

    @Autowired
    OpenSearchClient searchClient;

    public String search(String keyword) {
        try {
            searchClient.count();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
        return "ok";
    }

}
